<?php

namespace app\admin\validate;

use think\Validate;

class AlbumAudioValidate extends Validate
{
    protected $rule =   [
        'superiorId' => 'require',
        'name' => 'require',
        'duration' => 'require',
        'url' => 'require',
        'id' => 'require',
        'ids' => 'require',
        'current' => 'require',
        'size' => 'require',
    ];

    protected $message = [
        'superiorId.require' => '缺少参数superiorId',
        'name.require' => '缺少参数name',
        'duration.require' => '缺少参数duration',
        'url.require' => '缺少参数url',
        'id.require' => '缺少参数id',
        'ids.require' => '缺少参数ids',
        'current.require' => '缺少参数current',
        'size.require' => '缺少参数size',
    ];

    protected $scene = [
        'list' => ['superiorId','size', 'current'],
        'add' => ['superiorId','name', 'duration', 'url'],
        'edit' => ['id'],
        'dels' => ['ids'],
    ];
}